package model

import (
	"gorm.io/gorm"
	"time"
)

type Room struct {
	Id         int            `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	RoomUserId int            `gorm:"column:room_user_id;type:bigint(20) UNSIGNED;comment:群主id;not null;" json:"room_user_id"`                  // 群主id
	CreatedAt  time.Time      `gorm:"column:created_at;type:datetime(3);comment:创建时间;not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"` // 创建时间
	UpdatedAt  time.Time      `gorm:"column:updated_at;type:datetime(3);comment:更新时间;not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"` // 更新时间
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);comment:删除时间;default:NULL;" json:"deleted_at"`                          // 删除时间
}

func (Room) TableName() string {
	return "room"
}
